home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGBLER
/
WHIZZARD.LZH
/
SUBDEMO.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-06-26
|
22KB
|
518 lines
10 REM
20 REM Determine whether we are running compiled or interpreted
30 REM FLAG% = 0 if interpreted
40 REM FLAG% = 1 if compiled without /O (needs BASRUN.EXE)
45 REM FLAG% = 2 if compiled with /O
50 REM FLAG% = 3 if business basic compiled
60 REM
65 DEFINT I ' ***** this ISUBINIT will be an integer
70 KEY OFF
80 FOR I% = 1 TO 10
90 KEY I%,""
100 NEXT I%
110 REM
120 DEF SEG
130 TEST$ = "K"
140 A% = VARPTR(TEST$)
150 B% = PEEK(A%+1) + 256*PEEK(A%+2)
160 IF CHR$(PEEK(B%)) = "K" THEN FLAG% = 0 : GOTO 230
170 B% = PEEK(A%+2) + 256*PEEK(A%+3)
180 IF CHR$(PEEK(B%)) <> "K" THEN FLAG% = 3 : GOTO 740
182 WIDTH 80 : IF PEEK(&H7CC) = 80 THEN FLAG% = 1 ELSE FLAG% = 2
188 GOTO 740
200 REM
210 REM If interpreted, check that ASMBASIC is resident below the interpreter
220 REM
230 DEF SEG = 0
240 A% = PEEK(&H19C) + 256*PEEK(&H19D) : B% = PEEK(&H19E) + 256*PEEK(&H19F)
250 DEF SEG = B%
260 IF (PEEK(A%-1) = &H52) AND (PEEK(A%-2) = &H52) THEN 330
270 CLS : PRINT TAB(85);"ASMBASIC must be executed once before starting"
280 PRINT TAB(15);"the Basic interpreter"
290 SYSTEM
300 REM
310 REM If interpreted, then get the segment and offset of the utility routines
320 REM
330 DEF SEG
340 DIM INIT%(3) ' setup subroutine containing INT 67h
350 INIT%(1) = &H67CD ' RETF 2
360 INIT%(2) = &H2CA
370 INIT%(3) = 0
380 ISUBINIT = 0
390 REM
400 REM get the code segment of the utility subroutines
410 SEGVALUE% = 0
420 ISUBINIT = VARPTR(INIT%(1)): CALL ISUBINIT(SEGVALUE%)
430 REM
440 REM get the offset of the utility subroutines
450 A% = 1
460 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
470 QPRINT = A%
480 A% = 2
490 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
500 SCRLDN = A%
510 A% = 3
520 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
530 SCRLUP = A%
540 A% = 4
550 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
560 XREP = A%
570 A% = 5
580 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
590 YREP = A%
600 A% = 6
610 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
620 CLREOL = A%
630 A% = 7
640 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
650 CLREOS = A%
660 A% = 8
670 ISUBINIT = VARPTR(INIT%(1)):CALL ISUBINIT(A%)
680 ZPRINT = A%
690 REM
700 REM set the segment value for interpreted basic
710 REM
720 DEF SEG = SEGVALUE%
730 REM
740 REM define some attributes for use throughout the demo
750 REM
760 CLS : LOCATE 4,4 : INPUT "Would you like the demonstration in color (Y/N)";A$
770 IF A$ = "Y" OR A$ = "y" THEN 970
780 IF A$ <> "N" AND A$ <> "n" THEN 760
790 REM
800 REM black and white attributes
810 REM
820 NORMAL% = 7 ' normal intensity white on black
830 BLUE% = 7
840 GREEN% = 7
850 CYAN% = 7
860 RED% = 7
870 MAGENTA% = 7
880 BROWN% = 7
890 YELLOW% = 7
900 WHITE% = 15 ' high intensity white on black
910 LIGHTER% = 7
920 BLINK% = 128
930 GOTO 1240
940 REM
950 REM color attributes
960 REM
970 NORMAL% = 7 ' normal intensity white on black
980 BLUE% = 1
990 GREEN% = 2
1000 CYAN% = 3
1010 RED% = 4
1020 MAGENTA% = 5
1030 BROWN% = 6
1040 YELLOW% = 14
1050 WHITE% = 15 ' high intensity white on black
1060 REM
1070 REM To make a color lighter, logically OR the LIGHTER% with
1080 REM the color.
1090 REM Ex: ATTRIBUTE% = RED% OR LIGHTER%
1100 REM will give a light red color.
1110 REM
1120 LIGHTER% = 8
1130 REM
1140 REM To make a color blink, logically OR the BLINK% with
1150 REM the color.
1160 REM Ex: ATTRIBUTE% = RED% OR BLINK%
1170 REM will give a blinking red color.
1180 REM
1190 BLINK% = 128
1200 REM
1210 REM
1220 REM start by demonstrating XREP --------------------------------------
1230 REM
1240 CLS : INPUT "Type a carriage return for a countdown by subroutine XREP",A$
1250 FOR I% = 9 TO 0 STEP -1
1260 LOCATE 1,1
1270 COUNT% = 2000 ' write 2000 characters (full screen
1280 LETTER$ = RIGHT$(STR$(I%),1) ' letter to write is loop counter
1290 REM if user asks for a color display then use I% to set color
1300 IF BLUE% = 1 THEN ATTRIBUTE% = I% + 1 ELSE ATTRIBUTE% = NORMAL%
1310 CALL XREP( FLAG% , LETTER$ , COUNT% , ATTRIBUTE% )
1320 NEXT I%
1330 REM
1340 CLS : LOCATE 2,1
1350 PRINT TAB(3);"XREP repeats a given character along the x axis"
1360 PRINT TAB(9);"The argument list for XREP includes the repetition count"
1370 PRINT TAB(9);"and color you want for the character. The demonstration"
1380 PRINT TAB(9);"countdown is generated by a LOCATE 1,1 followed by a call"
1390 PRINT TAB(9);"to XREP with a repeat count of 2000 (25 lines times 80"
1400 PRINT TAB(9);"columns = 2000)."
1410 LOCATE 10,20 : A$ = "A" : COUNT% = 40
1420 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1430 LOCATE 11,25 : A$ = "B" : COUNT% = 30
1440 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1450 LOCATE 12,30 : A$ = "C" : COUNT% = 20
1460 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1470 LOCATE 13,35 : A$ = "D" : COUNT% = 10
1480 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1490 LOCATE 14,39 : A$ = "E" : COUNT% = 2
1500 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1510 LOCATE 15,35 : A$ = "F" : COUNT% = 10
1520 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1530 LOCATE 16,30 : A$ = "G" : COUNT% = 20
1540 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1550 LOCATE 17,25 : A$ = "H" : COUNT% = 30
1560 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1570 LOCATE 18,20 : A$ = "I" : COUNT% = 40
1580 CALL XREP( FLAG% , A$ , COUNT% , NORMAL% )
1590 REM
1600 LOCATE 20,5
1610 PRINT TAB(3);"Press ESC to repeat the XREP countdown. Enter a carriage"
1620 PRINT TAB(3);"return to proceed to the next demonstration."
1630 X$ = INKEY$ : IF LEN(X$) = 0 THEN 1630
1640 IF X$ = CHR$(13) THEN 1700
1650 IF X$ = CHR$(27) THEN 1250 ELSE 1630
1660 REM
1670 REM
1680 REM next demonstrate YREP --------------------------------------
1690 REM
1700 CLS : LOCATE 2,2
1710 PRINT "Just as XREP repeats a character along the X axis"
1720 PRINT "YREP repeats a character down the Y axis. For applications"
1730 PRINT "with vertical elements, this beats the tar out of a series"
1740 PRINT "of LOCATE:PRINT statment pairs."
1750 PRINT
1760 INPUT "Type a carriage return for a demonstration of subroutine YREP",A$
1770 REM
1780 CLS
1790 LOCATE 1,1 : LETTER$ = "A" : COUNT% = 25 : ATTRIBUTE% = NORMAL%
1800 GOSUB 2310
1810 LOCATE 2,2 : LETTER$ = "B" : COUNT% = 23 : ATTRIBUTE% = BLUE%
1820 GOSUB 2310
1830 LOCATE 3,3 : LETTER$ = "C" : COUNT% = 21 : ATTRIBUTE% = GREEN%
1840 GOSUB 2310
1850 LOCATE 4,4 : LETTER$ = "D" : COUNT% = 19 : ATTRIBUTE% = CYAN%
1860 GOSUB 2310
1870 LOCATE 5,5 : LETTER$ = "E" : COUNT% = 17 : ATTRIBUTE% = RED%
1880 GOSUB 2310
1890 LOCATE 6,6 : LETTER$ = "F" : COUNT% = 15 : ATTRIBUTE% = MAGENTA%
1900 GOSUB 2310
1910 LOCATE 7,7 : LETTER$ = "G" : COUNT% = 13 : ATTRIBUTE% = BROWN%
1920 GOSUB 2310
1930 LOCATE 8,8 : LETTER$ = "H" : COUNT% = 11
1940 ATTRIBUTE% = BLUE% OR LIGHTER%
1950 GOSUB 2310
1960 LOCATE 9,9 : LETTER$ = "I" : COUNT% = 9
1970 ATTRIBUTE% = GREEN% OR LIGHTER%
1980 GOSUB 2310
1990 LOCATE 10,10 : LETTER$ = "J" : COUNT% = 7
2000 ATTRIBUTE% = CYAN% OR LIGHTER%
2010 GOSUB 2310
2020 LOCATE 11,11 : LETTER$ = "K" : COUNT% = 5
2030 ATTRIBUTE% = RED% OR LIGHTER%
2040 GOSUB 2310
2050 LOCATE 12,12 : LETTER$ = "L" : COUNT% = 3
2060 ATTRIBUTE% = MAGENTA% OR LIGHTER%
2070 GOSUB 2310
2080 LOCATE 13,13 : LETTER$ = "M" : COUNT% = 1
2090 ATTRIBUTE% = BROWN% OR LIGHTER%
2100 GOSUB 2310
2110 LOCATE 14,14 : LETTER$ = "N" : COUNT% = 24
2120 ATTRIBUTE% = BLUE% OR BLINK%
2130 GOSUB 2310
2140 LOCATE 15,15 : LETTER$ = "O" : COUNT% = 22
2150 ATTRIBUTE% = GREEN%
2160 GOSUB 2310
2170 LOCATE 16,16 : LETTER$ = "P" : COUNT% = 20
2180 ATTRIBUTE% = CYAN%
2190 GOSUB 2310
2200 LOCATE 17,17 : LETTER$ = "Q" : COUNT% = 18
2210 ATTRIBUTE% = RED%
2220 GOSUB 2310
2230 LOCATE 18,18 : LETTER$ = "R" : COUNT% = 16
2240 ATTRIBUTE% = MAGENTA%
2250 GOSUB 2310
2260 LOCATE 19,19 : LETTER$ = "S" : COUNT% = 14
2270 ATTRIBUTE% = BROWN%
2280 GOSUB 2310
2290 GOTO 2330
2300 REM
2310 CALL YREP( FLAG% , LETTER$ , COUNT% , ATTRIBUTE% ) : RETURN
2320 REM
2330 LOCATE 2,30 : PRINT "Like XREP, the argument list for YREP includes the"
2340 LOCATE 3,30 : PRINT "repeat count and the color of the character."
2350 LOCATE 4,30 : PRINT "When a repeat count carries a character off the"
2360 LOCATE 5,30 : PRINT "bottom of the screen it wraps around to the top."
2370 REM
2380 LOCATE 7,30 : PRINT "Press ESC to repeat the YREP screen."
2390 LOCATE 8,30 : PRINT " Enter a carriage return to proceed to"
2400 LOCATE 9,30 : PRINT " the next demonstration."
2410 X$ = INKEY$ : IF LEN(X$) = 0 THEN 2410
2420 IF X$ = CHR$(13) THEN 2450
2430 IF X$ = CHR$(27) THEN 1780 ELSE 2410
2440 REM
2450 REM
2460 REM next demonstrate QPRINT --------------------------------------
2470 REM
2480 CLS : LOCATE 2,1
2490 PRINT TAB(3);"QPRINT will quickly print any string on the screen"
2500 PRINT TAB(9);"starting at the current location. The cursor is then"
2510 PRINT TAB(9);"moved to just after the string. Whatever color has been"
2520 PRINT TAB(9);"set by the BASIC COLOR statement will be used by QPRINT"
2530 PRINT TAB(9);"to print the string passed to it."
2540 PRINT
2550 INPUT "Type a carriage return to display a screen using subroutine QPRINT",A$
2560 REM
2562 CLS : LOCATE 2,20
2564 A$ = "This screen has been printed using QPRINT"
2566 CALL QPRINT( FLAG% , A$ )
2570 LOCATE 5,5
2580 A$ = "There are eight subroutines in the Basic Support Clubware Package"
2590 CALL QPRINT( FLAG% , A$ )
2600 LOCATE 7,10
2610 A$ = "XREP - repeat a character along the X axis some number of times"
2620 CALL QPRINT( FLAG% , A$ )
2630 LOCATE 9,10
2640 A$ = "YREP - repeat a character down the y axis some number of times"
2650 CALL QPRINT( FLAG% , A$ )
2660 LOCATE 11,10
2670 A$ = "QPRINT - quickly print a string on the screen"
2680 CALL QPRINT( FLAG% , A$ )
2690 LOCATE 13,10
2700 A$ = "ZPRINT - write a string to the screen using a special color attribute"
2710 CALL QPRINT( FLAG% , A$ )
2720 LOCATE 15,10
2730 A$ = "SCRLDN - scroll some portion of the screen down"
2740 CALL QPRINT( FLAG% , A$ )
2750 LOCATE 17,10
2760 A$ = "SCRLUP - scroll some portion of the screen up"
2770 CALL QPRINT( FLAG% , A$ )
2780 LOCATE 19,10
2790 A$ = "CLREOS - clear screen from current position to end of page"
2800 CALL QPRINT( FLAG% , A$ )
2810 LOCATE 21,10
2820 A$ = "CLREOL - clear screen from current position to end of line"
2830 CALL QPRINT( FLAG% , A$ )
2840 REM
2850 LOCATE 24,5
2860 A$ = "Press ESC to rewrite the screen using QPRINT. Enter a carriage"
2870 CALL QPRINT( FLAG% , A$ )
2880 LOCATE 25,5
2890 A$ = "return to proceed to the next demonstration."
2900 CALL QPRINT( FLAG% , A$ )
2910 X$ = INKEY$ : IF LEN(X$) = 0 THEN 2910
2920 IF X$ = CHR$(13) THEN 2940
2930 IF X$ = CHR$(27) THEN 2570 ELSE 2910
2940 REM
2950 REM
2960 REM next demonstrate CLREOL and CLREOS ---------------------------
2970 REM
2980 CLS : LOCATE 2,1
2990 PRINT TAB(3);"CLREOL will clear from the current position to the"
3000 PRINT TAB(9);"end of the line and CLREOS will clear from the current"
3010 PRINT TAB(9);"position to the end of the screen. Move the cursor using"
3020 PRINT TAB(9);"the cursor control keys (up ";CHR$(24);", down ";CHR$(25);
3030 PRINT ", left ";CHR$(27);", right ";CHR$(26);") then"
3040 PRINT TAB(12);"press F1 to demonstrate CLREOL"
3050 PRINT TAB(12);"press F2 to demonstrate CLREOS"
3060 REM
3070 A$ = "ABCDEFGHIJ----------KLMNOPQRST----------"
3080 B$ = "----------1234567890----------1234567890"
3090 LOCATE 9,1
3100 REM
3110 REM Use qprint to prevent unwanted scrolls when writing line 24, 25
3120 REM
3130 FOR I% = 1 TO 8
3140 PRINT A$; : CALL QPRINT( FLAG% , B$ )
3150 PRINT B$; : CALL QPRINT( FLAG% , A$ )
3160 NEXT I%
3170 PRINT A$; : CALL QPRINT( FLAG% , B$ )
3180 REM
3190 Y% = 15 : X% = 40
3200 LOCATE Y%,X%,1
3210 X$ = INKEY$ : IF LEN(X$) < 2 THEN 3210
3220 X$ = RIGHT$(X$,1)
3230 IF X$ = CHR$(59) THEN CALL CLREOL( FLAG% ) : GOTO 3370 'F1
3240 IF X$ = CHR$(60) THEN CALL CLREOS( FLAG% ) : GOTO 3370 'F2
3250 IF X$ = CHR$(72) THEN Y% = Y% - 1 : GOTO 3320 'up
3260 IF X$ = CHR$(80) THEN Y% = Y% + 1 : GOTO 3320 'down
3270 IF X$ = CHR$(75) THEN X% = X% - 1 : GOTO 3300 'left
3280 IF X$ = CHR$(77) THEN X% = X% + 1 : GOTO 3300 'right
3290 GOTO 3210
3300 IF X% < 1 THEN X% = 80 : ELSE IF X% > 80 THEN X% = 1
3310 GOTO 3200
3320 IF Y% < 9 THEN Y% = 25 : ELSE IF Y% > 25 THEN Y% = 9
3330 GOTO 3200
3340 REM
3350 REM use xrep to clear the top 8 lines
3360 REM
3370 A$ = " " : COUNT% = 8 * 80 : ATTRIBUTE% = NORMAL%
3380 LOCATE 1,1 : CALL XREP( FLAG% , A$ , COUNT% , ATTRIBUTE% )
3390 LOCATE 2,20 : PRINT "After clearing the requested portion of the screen"
3400 LOCATE 3,20 : PRINT "CLREOL and CLREOS will leave the cursor in its original"
3410 LOCATE 4,20 : PRINT "location."
3420 LOCATE 5,30 : PRINT "Press ESC to repeat the CLREOL/CLREOS demo."
3430 LOCATE 6,30 : PRINT " Enter a carriage return to proceed to"
3440 LOCATE 7,30 : PRINT " the next demonstration."
3450 X$ = INKEY$ : IF LEN(X$) = 0 THEN 3450
3460 IF X$ = CHR$(27) THEN 2980
3470 IF X$ = CHR$(13) THEN 3530 ELSE 3450
3480 REM
3490 REM
3500 REM
3510 REM next demonstrate ZPRINT, SCRLDN, SCRLUP ---------------------
3520 REM
3530 CLS : LOCATE 2,1
3540 PRINT TAB(3);"ZPRINT will print a character string starting at the"
3550 PRINT TAB(9);"current location using the special color/attribute"
3560 PRINT TAB(9);"passed in."
3570 PRINT TAB(3);"This screen will also demonstrate SCRLUP/SCRLDN which"
3580 PRINT TAB(9);"allow any portion of the page to be scrolled up or"
3585 PRINT TAB(9);"down."
3590 PRINT
3600 INPUT "Type a carriage return to display a screen using subroutine ZPRINT",A$
3601 CLS
3602 GOSUB 5690 ' write instructions at bottom of screen
3603 A1$ = "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"
3604 A2$ = "2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2"
3605 A3$ = "3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3"
3606 A4$ = "4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4"
3607 A5$ = "5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5"
3608 A6$ = "6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6"
3609 A7$ = "7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7"
3610 A8$ = "8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8"
3611 A9$ = "9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9"
3612 AA$ = "A A A A A A A A A A A A A A A A A A A"
3613 AB$ = "B B B B B B B B B B B B B B B B B B"
3614 AC$ = "C C C C C C C C C C C C C C C C C"
3615 AD$ = "D D D D D D D D D D D D D D D D"
3616 AE$ = "E E E E E E E E E E E E E E E"
3619 REM
3620 GOSUB 5030 'clear the screen
3630 GOSUB 5390 'generate page1 on top half of screen
3650 GOTO 4000
3660 REM
3670 GOSUB 5030 'clear the screen
3680 GOSUB 5090 'generate page2 on bottom half of screen
3700 GOTO 4000
3710 REM
4000 X$ = INKEY$ : IF LEN(X$) = 0 THEN 4000
4005 IF LEN(X$) = 1 THEN IF X$ = CHR$(13) THEN 6000 : ELSE 4000
4010 X$ = RIGHT$(X$,1)
4020 IF X$ = CHR$(59) THEN GOTO 3620 'F1 page 1
4030 IF X$ = CHR$(60) THEN GOTO 3670 'F2 page 2
4040 IF X$ = CHR$(72) THEN GOSUB 5830 : GOTO 4000 'scroll up
4050 IF X$ = CHR$(80) THEN GOSUB 5890 : GOTO 4000 'scroll down
4060 GOTO 4000
4997 REM
4998 REM --start of subroutines used for ZPRINT demo-----
4999 REM
5000 REM
5010 REM clear the top 19 lines using SCRLDN
5020 REM
5030 X1% = 1 : Y1% = 1 : X2% = 80 : Y2% = 19 : COUNT% = 0
5040 CALL SCRLDN( Y1% , X1% , Y2% , X2% , COUNT%)
5050 RETURN
5060 REM
5070 REM generate page2 in the bottom half of the screen
5080 REM
5090 PAGE% = 2
5095 A$ = "/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\"
5100 LOCATE 11,10 : CALL ZPRINT ( FLAG% , A$ , BLUE% )
5110 A$ = CHR$(179) : COUNT% = 7
5120 LOCATE 12,9 : CALL YREP ( FLAG% , A$ , COUNT% , BLUE% )
5130 A$ = CHR$(192) : COUNT% = 1
5140 LOCATE 19,9 : CALL XREP ( FLAG% , A$ , COUNT% , BLUE% )
5150 A$ = CHR$(196) : COUNT% = 60
5160 CALL XREP ( FLAG% , A$ , COUNT% , BLUE% )
5170 A$ = CHR$(217) : COUNT% = 1
5180 CALL XREP ( FLAG% , A$ , COUNT% , BLUE% )
5190 A$ = CHR$(179) : COUNT% = 7
5200 LOCATE 12,70 : CALL YREP ( FLAG% , A$ , COUNT% , BLUE% )
5220 LOCATE 12,18 : CALL ZPRINT ( FLAG% , A7$ , YELLOW% )
5240 LOCATE 13,17 : CALL ZPRINT ( FLAG% , A6$ , YELLOW% )
5260 LOCATE 14,16 : CALL ZPRINT ( FLAG% , A5$ , YELLOW% )
5280 LOCATE 15,15 : CALL ZPRINT ( FLAG% , A4$ , YELLOW% )
5300 LOCATE 16,14 : CALL ZPRINT ( FLAG% , A3$ , YELLOW% )
5320 LOCATE 17,13 : CALL ZPRINT ( FLAG% , A2$ , YELLOW% )
5340 LOCATE 18,12 : CALL ZPRINT ( FLAG% , A1$ , YELLOW% )
5350 RETURN
5360 REM
5370 REM generate page1 in the top half of the screen
5380 REM
5390 PAGE% = 1
5395 A$ = "\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/"
5400 LOCATE 10,10 : CALL ZPRINT ( FLAG% , A$ , RED% )
5410 A$ = CHR$(179) : COUNT% = 7
5420 LOCATE 3,9 : CALL YREP ( FLAG% , A$ , COUNT% , RED% )
5430 A$ = CHR$(218) : COUNT% = 1
5440 LOCATE 2,9 : CALL XREP ( FLAG% , A$ , COUNT% , RED% )
5450 A$ = CHR$(196) : COUNT% = 60
5460 CALL XREP ( FLAG% , A$ , COUNT% , RED% )
5470 A$ = CHR$(191) : COUNT% = 1
5480 CALL XREP ( FLAG% , A$ , COUNT% , RED% )
5490 A$ = CHR$(179) : COUNT% = 7
5500 LOCATE 3,70 : CALL YREP ( FLAG% , A$ , COUNT% , RED% )
5520 LOCATE 3,26 : CALL ZPRINT ( FLAG% , AE$ , YELLOW% )
5540 LOCATE 4,25 : CALL ZPRINT ( FLAG% , AD$ , YELLOW% )
5560 LOCATE 5,24 : CALL ZPRINT ( FLAG% , AC$ , YELLOW% )
5580 LOCATE 6,23 : CALL ZPRINT ( FLAG% , AB$ , YELLOW% )
5600 LOCATE 7,22 : CALL ZPRINT ( FLAG% , AA$ , YELLOW% )
5620 LOCATE 8,21 : CALL ZPRINT ( FLAG% , A9$ , YELLOW% )
5640 LOCATE 9,20 : CALL ZPRINT ( FLAG% , A8$ , YELLOW% )
5650 RETURN
5660 REM
5670 REM print instructions at the bottom of the screen
5680 REM
5690 A$ = "Type F1 to display page 1"
5700 LOCATE 20,6 : CALL ZPRINT ( FLAG% , A$ , GREEN% )
5710 A$ = "Type F2 to display page 2"
5720 LOCATE 21,6 : CALL ZPRINT ( FLAG% , A$ , GREEN% )
5730 A$ = "Type "+CHR$(24)+" to scroll the page up"
5740 LOCATE 22,6 : CALL ZPRINT ( FLAG% , A$ , GREEN% )
5750 A$ = "Type "+CHR$(25)+" to scroll the page down"
5760 LOCATE 23,6 : CALL ZPRINT ( FLAG% , A$ , GREEN% )
5770 A$ = "Type a carriage return to leave this demonstration screen"
5780 LOCATE 24,6 : CALL ZPRINT ( FLAG% , A$ , GREEN% )
5790 RETURN
5800 REM
5810 REM scroll page up a line
5820 REM
5830 IF PAGE% = 2 THEN X1% = 10 : Y1% = 12 : X2% = 69 : Y2% = 18 ELSE X1% = 10 : Y1% = 3 : X2% = 69 : Y2% = 9
5840 COUNT% = 1 : CALL SCRLUP( Y1% , X1% , Y2% , X2% , COUNT%)
5850 RETURN
5860 REM
5870 REM scroll page down a line
5880 REM
5890 IF PAGE% = 2 THEN X1% = 10 : Y1% = 12 : X2% = 69 : Y2% = 18 ELSE X1% = 10 : Y1% = 3 : X2% = 69 : Y2% = 9
5900 COUNT% = 1 : CALL SCRLDN( Y1% , X1% , Y2% , X2% , COUNT%)
5910 RETURN
5997 REM
5998 REM ----end of subroutines used for ZPRINT demo-----
5999 REM
6000 REM
6010 CLS : LOCATE 2,1
6020 PRINT TAB(3);"This concludes the ASMBASIC demonstration program."
6025 PRINT
6030 PRINT TAB(9);"The program is stored on diskette in file SUBDEMO.BAS"
6040 PRINT TAB(9);"as a printable text file. Some versions will however"
6050 PRINT TAB(9);"contain tab characters. Refer to files DETAB.BAS and"
6060 PRINT TAB(9);"SETABS.EPS for help in eliminating the embedded tabs."
6063 REM
6064 IF FLAG% = 3 THEN SYSTEM 'nothing more to do for business basic
6065 REM
6066 PRINT
6070 IF FLAG% > 0 THEN GOTO 6200
6080 PRINT "You may use this program to demonstrate the BASPRINT module."
6090 PRINT "Execute BASPRINT.EXE, then use the BASIC interpreter to rerun"
6100 PRINT "BASDEMO.BAS . Those portions of the demonstration screens"
6110 PRINT "generated by PRINT statements will then execute several times"
6120 PRINT "faster."
6130 SYSTEM
6140 REM
6200 IF FLAG% = 1 THEN GOTO 6240 ' already compiled without /O
6202 PRINT "You may use this program to demonstrate the PRSLASHO module."
6210 PRINT "Execute PRSLASHO.EXE, then rerun this compiled BASIC program."
6220 PRINT "Those portions of the demonstration screens generated by"
6230 PRINT "PRINT statements will then execute several times faster."
6240 PRINT
6250 PRINT "If you use the BASIC runtime module BASRUN.EXE, you "
6260 PRINT "can compile and link SUBDEMO.BAS without the /O option."
6270 PRINT "Then execute COMPRINT.EXE to speed up those portions of"
6280 PRINT "the demonstration screens generated by PRINT statements."
6340 SYSTEM